package com.report.reportserver.service.impl;

import com.report.reportserver.mapper.TeacherMapper;
import com.report.reportserver.model.Teacher;
import com.report.reportserver.service.TeacherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ ClassName: TeacherServiceImpl
 * @ Description：查询教师信息
 * @ Modified By：
 * @ Version:
 * @ Author     ：LiYing
 * @ Date       ：Created in 16:36 2022/3/29
 */
@Service
public class TeacherServiceImpl implements TeacherService {
    @Autowired
    TeacherMapper teacherMapper;

    @Override
    public Teacher queryTeacherById(Integer id) {
        return teacherMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<Teacher> queryTeacherByName(String name) {
        return teacherMapper.selectByName(name);
    }

    @Override
    public Teacher queryTeacherByNumber(String number) {
        return teacherMapper.selectByNumber(number);
    }

    @Override
    public List<Teacher> queryTeacherByAcademy(String academy) {
        return teacherMapper.selectByAcademy(academy);
    }

    @Override
    public List<Teacher> queryTeacherByTitle(String title) {
        return teacherMapper.selectByTitle(title);
    }

    @Override
    public void insertTeacher(Teacher record) {
        teacherMapper.insert(record);
    }
}
